package ynu.sxp.demoapp.entity;

import jakarta.persistence.*;
import lombok.Data;
import ynu.sxp.demoapp.common.BaseEntity;

import java.util.UUID;

@Data
@Entity
@Table(name = "orderdetailet")
public class OrderDetailet extends BaseEntity {
    @Column(nullable = false)
    private UUID orderId; // 修改为 UUID 类型

    @Column(nullable = false)
    private Integer foodId;

    @Column(nullable = false)
    private Integer quantity;

    @ManyToOne
    @JoinColumn(name = "orderId", insertable = false, updatable = false)
    private Orders order;
}